package luke4fun.wheresmymoney.common;

import android.graphics.Color;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;

import luke4fun.wheresmymoney.util.DateUtil;

public class CommonConstants {
	
	public static final String DATE_FORMAT = "MM/dd/yyyy";
	public static final String ARG_DATE = "dateInMillis";
	
	public static int SHIFT_LEFT = 1;
	public static int SHIFT_RIGHT = -1;
	public static long ONE_DAY = 86400000;
	public static long CURRENT_MONTH = DateUtil.getCurrentMonthInMillis();
	public static long LEFT_LIMIT_MONTH;
	public static List<Integer> COLOR = new ArrayList<Integer>(0);

	private static int HOLO_BLUE_LIGHT = 0xff33b5e5;
	private static int HOLO_GREEN_LIGHT = 0xff99cc00;
	private static int HOLO_ORANGE_LIGHT = 0xffffbb33;
	private static int HOLO_RED_LIGHT = 0xffff4444;
	private static int HOLO_PURPLE = 0xffaa66cc;
	private static int OLIVE = 0xff808000;
	private static int SIENNA = 0xffA0522D;
	private static int HOTPINK = 0xffff69b4;
	private static int CHOCOLATE = 0xd269e1;
	private static int MEDIUM_VIOLET_RED = 0xffC71585;
	private static int GOLDEN_ROD = 0xffdaa520;
	private static int TOMATO = 0xffff6347;
	
	private static void initColors() {
		COLOR.add(HOLO_BLUE_LIGHT);
		COLOR.add(HOLO_GREEN_LIGHT);
		COLOR.add(HOLO_ORANGE_LIGHT);
		COLOR.add(HOLO_RED_LIGHT);
		COLOR.add(HOLO_PURPLE);
		COLOR.add(SIENNA);
		COLOR.add(Color.CYAN);
		COLOR.add(OLIVE);
		COLOR.add(Color.MAGENTA);
		COLOR.add(Color.LTGRAY);
		COLOR.add(HOTPINK);
		COLOR.add(CHOCOLATE);
		COLOR.add(MEDIUM_VIOLET_RED);
		COLOR.add(GOLDEN_ROD);
		COLOR.add(TOMATO);
	}

	static {
		Calendar c = Calendar.getInstance();
		c.clear();
		c.set(Calendar.YEAR, 2012);
		LEFT_LIMIT_MONTH = c.getTimeInMillis();
		
		initColors();
	}
	
	public static final int NEW_VIEW_ID = 65535;
}
